home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power DOS 1996 July
/
Power DOS - July 1996.iso
/
sound
/
c_labs
/
patches
/
monolg.exe
/
README.NOW
< prev
next >
Wrap
Text File
|
1993-12-13
|
9KB
|
241 lines
To install:
Copy the MONOLOGW.EXE file to c:\MONOLOGW directory.
That's it.
Now on to other information.
Monologue for Windows
Version 1.7 OEM
October 29, 1993
Copyright (c) 1993, First Byte.
----------------------------------------------------------------------
This diskette contains an updated version of the Monologue speech
accessory for Windows 3.1. It contains a single file MONOLOGW.EXE
which should be copied over the version 1.5 OEM file of the same
name. For a default Monologue installation, this file lives in
the C:\MONOLOGW directory.
Bugs fixed:
1. Previous versions had problems when more than a couple K bytes of
text were passed to Monologue through Clipboard or DDE. This version
can handle a few pages worth of text at a time. (limit of about 15K).
2. Previous version sometimes had problems when a period was
encountered. This has been fixed.
3. This version of Monologue will speak "in the background" while
other Windows applications are active. Speech can be halted by
clicking on the minimized Monologue Icon with either the right or
left mouse button while speech is in progress.
-----------------------------------------------------------------------------------------
A Short Guide to Programming the First Byte Speech Engine
Copyright 1993, Creative Labs, Inc.
There are three commands that you need to be familiar with
when including text-to-speech capability to your Windows 3.1
programs. They are:
For C:
long FAR PASCAL OpenSpeech(HWND hWnd, WORD mode, LPSTR voicetype);
int FAR PASCAL Say(long SCB, LPSTR lpText);
void FAR PASCAL CloseSpeech(long SCB);
In Microsoft's Visual Basic, you need to make the following declarations:
Declare Function OpenSpeech Lib "\monologw\fb_spch.dll" (ByVal hWnd%, ByVal mode%, ByVal voicetype$) As Long
Declare Function CloseSpeech Lib "\monologw\fb_spch.dll" (ByVal lpSCB&) As Integer
Declare Function Say Lib "\monologw\fb_spch.dll" (ByVal lpSCB&, ByVal phrase$) As Integer
For C++ programmers, please bear in mind that you need to declare these
functions inside an extern "C" declaration.
1) OpenSpeech
This function is used to initialize the text-to-speech interface and
must be invoked before the Say function is used. By default, the function
uses a "speech font" called FB_11K8. hWnd and node are usually set to zero.
OpenSpeech returns a long integer called the Speech Control Block. This
value is used later in the Say and CloseSpeech functions. Thus, the function
is expressed as:
long lSCB
lSCB = OpenSpeech(0, 0, NULL);
For programmers using Visual Basic, the speech font must be defined, since
"NULL" is not defined. Depending on which file is available in the MONOLOGW directory
The statement should thus read:
DIM lSBC as LONG
DIM xxx as Variant
lSCB = OpenSpeech(0, 0, "FB_11K8");
or
lSCB = OpenSpeech(0, 0, "FB_22K16);
FB_11K8 is used for 8 bit speech. This is the will work with all the sound blaster cards.
FB_22K16 is used for 16 Bit speech. Only for 16 bit cards.
2) Say
Say is the function used to actually translate the text over to spoken
words. It returns a value of 0 if no error is found. The parameters that
it takes are the Speech Control Block and the string containing the text you
want to have read back. For example:
Say(lSCB, "Hello world!");
Visual Basic:
xxx = Say(lSCB, "Hello World!")
NOTE: Visual Basic and Windows.
You Should Give time for the Speech function to initailize befor allowing it to process
the SAY command. ie a time out function, a mouse click FormLoad,..ect.
Same applies for windows. The Say Command needs to be tied to an event or timer or button.
For example, if the SAY command is Called too soon, you may get a message telling
that the wave device is not ready. or similar things. So please at least have a start
button or form load befor calling the first SAY. You could start up a timer, and then
allow an amount of time to pass befor allow the say command to be processed.
Modifications can be made to change the pitch, volume, and speed of the
spoken output. A series of symbols are used inside the string to accomplish
this. These are:
[ Shortens the phoneme that follows. Cummulitive
] Lengthens the phoneme that follows. Cumulitive ie ]]]
/ Increases pitch by 20%.
' Increases pitch by 30% and lengthens the phoneme that follows.
" Increases pitch by 20% and lengthens the phoneme that follows.
- Decreases pitch by 30% and shortens the phoneme that follows.
Pn Global (one digit) Sets pitch to value between 0 and 9. (default is 5)
negitive values work ie -1 -2 -3 ... but be carfull, if to long
Sn Global (one digit) Sets speed to value between 0 and 9. (default is 5)
Vn Global (one digit) Sets volume to value between 0 and 9. (default is 5)
These symbols must be enclosed inside a pair of brackets and Tilde, like this:'<<~' and '>>'.
As an example, we can increase the speed by writing the following:
Say(lSCB, "<<~S8>> Hello World");
You will no doubt notice that the speech engine will not always pronounce
words as you would like them to. First Byte has thus provided a list of
their phonetic code and modifiers. The phoneme is CASE sensitive and in the Examples,
the capitalized letters are the sounds they represent.
For the benefit of those of you who did not receive a list of these phonetics,
it is provided below:
Phoneme Example Phoneme Example
_______________________________________________________
IY bEEt | y Yes
IH bIt | r Red
IX dEcide | w Wed
EH bEt | b Bed
AE bAt | d DeaD
AH bUt | g Get
AX About | v Vet
AA cOt | DH THen
UH bOOk | z Zen
UW bOOt | ZH uSual
OW bOAt | f Fit
ER bIRd | TH THin
AY bIte | s Sin
EY bAIt | SH SHin
OY bOY | h Him
AW bOUt | p Pin
LX faLL | PX sPin
I Low | t Top
m Mow | TX sTop
n No | DX buTTer
NG siNG | k Kite
| KX sKy
So, if you wanted to say "Rhinoceros" using Phonemes, you would program:
Say(lSCB, "<<~rIHn'AAsER-AHs>>");
This is only an example, you may adjust the phonemes to your liking, or allow the Speach Engin
to dicide how to pronounce the word.
It may take some experimentation to get a pronunciation that is close to
your regional accent.
If you use MONOLOG in windows, the Dictionary (an exception dictionary)
shows the phonetics for the words inserted in it.
3) CloseSpeech
One you have finished using the text-to-speech interface, simply use
the CloseSpeech function. It does return a value. 0 if successfull, -number if failed.
The only parameter it takes is the Speech Control Block. For example, we can have:
CloseSpeech(lSCB);
You must use CloseSpeech befor exiting. If you don't, the speech engin will continue
to take up memory.
4) Linking with the DLL
The dynamic link library that is used is called FB_SPCH.DLL (a mistake was
made in our manual in which the DLL listed was called SPEECH.DLL). In order
to use the above functions, you need to import them in your definition
file (the .DEF file). At the end of the file, simply enter the following:
IMPORTS
FB_SPCH.CLOSESPEECH
FB_SPCH.OPENSPEECH
FB_SPCH.SAY
using DDE:
At this time, We at AUG in Creative Labs Tech Support don't have a lot of
information regarding DDE usage. But here is at least one example.
DDE that uses monolog in window with MS WORD 2.0.
Create a macro with the following:
SUB Main
TextString$ = Selection$()
ChnNum = DDEInitiate("MONOLOG", "TALK")
if ChnNum = 0 then
MsgBox "Monolog is either not running or not in DDE server mode", "Macro Error"
Goto Finish
End If
DDEPoke ChnNum, " ", TextString$
DDETerminate ChnNum
Finish: 'End Label
End Sub
----------------------------------------------------------------------------
First Byte and Monologue for Windows are both trademarks of First Byte, Inc.